package com.dmcloud.system.config;

import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor;
import org.aspectj.lang.annotation.Aspect;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
@MapperScan("com.dmcloud.system.mapper")
@Aspect
public class MybatisPlusConfigurer {
	/**
	 * 分页插件
	 *
	 * @return PaginationInterceptor
	 */
	@Bean
	public PaginationInterceptor paginationInterceptor() {
		return new PaginationInterceptor();
	}

	/**
	 * 数据权限插件
	 *
	 * @return DataScopeInterceptor
	 */
//	@Bean
//	public DataScopeInterceptor dataScopeInterceptor() {
//		return new DataScopeInterceptor();
//	}

}
